diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-09-30 00:18:39 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-09-30 00:18:39 +0200 |
commit | 1ad000d5c8a9055f194d39244e95abdd62e0bbb0 (patch) | |
tree | 3081d932d80b6e181ae1dcfff3091076220efadb /qtsixa [maintainership transfered] | |
parent | new systemd service for qtsixa (diff) | |
download | aur-packages-1ad000d5c8a9055f194d39244e95abdd62e0bbb0.tar.gz aur-packages-1ad000d5c8a9055f194d39244e95abdd62e0bbb0.tar.bz2 aur-packages-1ad000d5c8a9055f194d39244e95abdd62e0bbb0.tar.xz |
no logner maintaining qtsixa
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'qtsixa [maintainership transfered]')
-rwxr-xr-x | qtsixa [maintainership transfered]/-watch- | 20 | ||||
-rwxr-xr-x | qtsixa [maintainership transfered]/PKGBUILD | 134 | ||||
-rw-r--r-- | qtsixa [maintainership transfered]/qtsixa-dbus.patch | 65 | ||||
-rw-r--r-- | qtsixa [maintainership transfered]/qtsixa-gksudo.patch | 71 | ||||
-rw-r--r-- | qtsixa [maintainership transfered]/qtsixa.install | 13 | ||||
-rw-r--r-- | qtsixa [maintainership transfered]/sixad-bin.patch | 17 | ||||
-rw-r--r-- | qtsixa [maintainership transfered]/sixad-init.patch | 54 | ||||
-rw-r--r-- | qtsixa [maintainership transfered]/sixad-shared-h.patch | 11 | ||||
-rw-r--r-- | qtsixa [maintainership transfered]/sixad.service | 15 |
9 files changed, 400 insertions, 0 deletions
diff --git a/qtsixa [maintainership transfered]/-watch- b/qtsixa [maintainership transfered]/-watch- new file mode 100755 index 0000000..ac78544 --- /dev/null +++ b/qtsixa [maintainership transfered]/-watch- @@ -0,0 +1,20 @@ +#!/bin/sh + +[ -f 'index.html' ] && rm 'index.html' +wget http://sourceforge.net/projects/qtsixa/files/ >/dev/null 2>/dev/null +if [ $? = 0 ]; then + [ -f unfetchable ] && rm unfetchable + grep 'title="QtSixA' < index.html | md5sum > new-sum + touch sum + if [ "$(cat sum)" = "$(cat new-sum)" ]; then + rm new-sum + else + mv new-sum sum + echo 'qtsixa' + fi + rm index.html +elif [ ! -f unfetchable ]; then + touch unfetchable + echo 'qtsixa (unfetchable)' +fi + diff --git a/qtsixa [maintainership transfered]/PKGBUILD b/qtsixa [maintainership transfered]/PKGBUILD new file mode 100755 index 0000000..69958df --- /dev/null +++ b/qtsixa [maintainership transfered]/PKGBUILD @@ -0,0 +1,134 @@ +# Maintainer: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@member.fsf.org> + +pkgname=qtsixa +pkgver=1.5.1 +pkgrel=20 +pkgdesc="An utility to configure and use sixaxis controller via bluetooth." +url="http://sourceforge.net/projects/qtsixa/" +arch=('i686' 'x86_64' 'ppc') +license=('GPL') +install=qtsixa.install +backup=('etc/default/sixad') +depends=('bluez4' 'python2-pyqt' 'qt4' 'python2' 'bluez-utils' 'bluez-libs' 'jack' 'libusb-compat') +makedepends=('patch' 'pyqt' 'bluez-libs') +conflicts=('sixpair') +source=(http://downloads.sourceforge.net/qtsixa/QtSixA-"$pkgver"-src.tar.gz + sixad-init.patch + sixad-bin.patch + sixad-shared-h.patch + sixad.service + qtsixa-dbus.patch + qtsixa-gksudo.patch) +md5sums=('d61bef5d737367aeddd57a6bc11da52a' + 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP') +build() { + # patch files for Arch Linux's filesystem heirarchy + pushd "$srcdir"/QtSixA-"$pkgver" + sed -i 's:/sbin/:/bin/:g' qtsixa/gui/qtsixa_main.py + sed -i 's: /bin/: /usr/bin/:g' qtsixa/gui/qtsixa_main.py + sed -i 's:/sbin/:/bin/:g' utils/Makefile + sed -i 's:/sbin/:/bin/:g' sixad/Makefile + sed -i 's: /sbin/: /usr/bin/:g' sixad/sixad + sed -i 's: /usr/sbin/: /usr/bin/:g' sixad/sixad + sed -i 's:/sbin/:/bin/:g' sixad/bluetooth.cpp + popd + + # patch for sixad daemon + echo "Patching sixad..." + patch -p0 < "$srcdir"/sixad-init.patch + patch -p0 < "$srcdir"/sixad-bin.patch + patch -p0 < "$srcdir"/sixad-shared-h.patch + patch -p0 < "$srcdir"/qtsixa-dbus.patch + patch -p0 < "$srcdir"/qtsixa-gksudo.patch + + cd "$srcdir"/QtSixA-$pkgver/qtsixa/gui/ + echo "Fixed python version..." + find . -name "*.py" -exec sed -i "s/python/python2/g" '{}' \; + sed -i 's/python/python2/g' ../qtsixa + sed -i 's/python/python2/g' ../../sixad/sixad-dbus-blocker + echo "Fixed bluetooth daemon" + sed -i 's/init.d/rc.d/g' qtsixa_main.py + + cd "$srcdir"/QtSixA-$pkgver + + make all || exit 1 + +} + +package() { +## Qtsixa installation, adapted from makefile of qtsixa folder ## +## make directories +mkdir -p \ + "$pkgdir"/usr/bin/ \ + "$pkgdir"/usr/share/applications/ \ + "$pkgdir"/usr/share/pixmaps/ \ + "$pkgdir"/usr/share/qtsixa/ \ + "$pkgdir"/usr/share/qtsixa/game-profiles/ \ + "$pkgdir"/usr/share/qtsixa/gui/ \ + "$pkgdir"/usr/share/qtsixa/icons/ \ + "$pkgdir"/usr/share/qtsixa/pics/ \ + "$pkgdir"/usr/share/qtsixa/profiles +# "$pkgdir"/usr/share/doc/qtsixa/manual +# "$pkgdir"/usr/share/qtsixa/lang/ \ +# "$pkgdir"/usr/share/doc/qtsixa/ \ + + +##systemd +mkdir -p "$pkgdir"/usr/lib/systemd/system/ +install -m 644 "$srcdir"/sixad.service "$pkgdir"/usr/lib/systemd/system/ + +cd "$srcdir/QtSixA-$pkgver/qtsixa" + +## Install files + install -m 755 qtsixa "$pkgdir"/usr/bin/ + install -m 755 sixad-lq "$pkgdir"/usr/bin/ + install -m 755 sixad-notify "$pkgdir"/usr/bin/ +# install -m 644 manual/* "$pkgdir"/usr/share/doc/qtsixa/manual/ + install -m 644 game-profiles/* "$pkgdir"/usr/share/qtsixa/game-profiles/ + install -m 644 gui/*.py "$pkgdir"/usr/share/qtsixa/gui/ + install -m 644 icons/* "$pkgdir"/usr/share/qtsixa/icons/ + install -m 644 pics/* "$pkgdir"/usr/share/qtsixa/pics/ + install -m 644 profiles/* "$pkgdir"/usr/share/qtsixa/profiles/ +# install -m 644 lang/* "$pkgdir"/usr/share/qtsixa/lang/ + install -m 644 sixad-notify.desktop "$pkgdir"/usr/share/qtsixa/ + install -m 644 qtsixa.desktop "$pkgdir"/usr/share/applications/ + install -m 644 qtsixa.xpm "$pkgdir"/usr/share/pixmaps/ + +## Sixad installation, adapted from makefile of sixad folder ## +## Make directories + +mkdir -p \ + "$pkgdir"/etc/default/ \ + "$pkgdir"/etc/rc.d/ \ + "$pkgdir"/etc/logrotate.d/ \ + "$pkgdir"/var/lib/sixad/ \ + "$pkgdir"/var/lib/sixad/profiles/ + +chmod 775 -R "$pkgdir"/var/lib/sixad/ + +cd ../sixad + +# Install files + install -m 644 sixad.default "$pkgdir"/etc/default/sixad + install -m 755 sixad.init "$pkgdir"/etc/rc.d/sixad + install -m 644 sixad.log "$pkgdir"/etc/logrotate.d/sixad + install -m 755 sixad "$pkgdir"/usr/bin/ + install -m 755 bins/sixad-bin "$pkgdir"/usr/bin/ + install -m 755 bins/sixad-sixaxis "$pkgdir"/usr/bin/ + install -m 755 bins/sixad-remote "$pkgdir"/usr/bin/ + install -m 755 bins/sixad-3in1 "$pkgdir"/usr/bin/ + install -m 755 bins/sixad-raw "$pkgdir"/usr/bin/ + install -m 755 sixad-dbus-blocker "$pkgdir"/usr/bin/ + #chmod 777 -R "$pkgdir"/var/lib/sixad/ + +## Utils installation, adapted from makefile of utils folder ## +## Install files + +cd ../utils + install -m 755 bins/sixpair "$pkgdir"/usr/bin/ + install -m 755 bins/sixpair-kbd "$pkgdir"/usr/bin/ + install -m 755 bins/hidraw-dump "$pkgdir"/usr/bin/ + install -m 755 bins/sixad-jack "$pkgdir"/usr/bin/ + +} + diff --git a/qtsixa [maintainership transfered]/qtsixa-dbus.patch b/qtsixa [maintainership transfered]/qtsixa-dbus.patch new file mode 100644 index 0000000..294cd47 --- /dev/null +++ b/qtsixa [maintainership transfered]/qtsixa-dbus.patch @@ -0,0 +1,65 @@ + diff -urp QtSixA-1.5.1.orig/qtsixa/gui/qtsixa_main.py QtSixA-1.5.1/qtsixa/gui/qtsixa_main.py +--- QtSixA-1.5.1.orig/qtsixa/gui/qtsixa_main.py 2012-12-06 22:59:03.103868725 -0800 ++++ QtSixA-1.5.1/qtsixa/gui/qtsixa_main.py 2012-12-06 22:59:55.033596582 -0800 +@@ -307,6 +307,8 @@ class MainW(QMainWindow, ui_qtsixa_mainw + def func_DBusDisconnect(self, mode, name, mac): + bus = dbus.SystemBus() + try: ++ if (getoutput("qtsixa "+"--check-bluetoothd") == "0"): ++ raise + bluez_bus = bus.get_object('org.bluez', '/') + bluez_id = bluez_bus.DefaultAdapter(dbus_interface='org.bluez.Manager') + adapter_bus = bus.get_object('org.bluez', bluez_id) +diff -urp QtSixA-1.5.1.orig/qtsixa/qtsixa QtSixA-1.5.1/qtsixa/qtsixa +--- QtSixA-1.5.1.orig/qtsixa/qtsixa 2012-12-06 22:59:03.107202042 -0800 ++++ QtSixA-1.5.1/qtsixa/qtsixa 2012-12-06 22:59:17.417127047 -0800 +@@ -68,6 +68,10 @@ fi + echo "$ROOT" + ;; + ++ check-bluetoothd|-check-bluetoothd|--check-bluetoothd) ++ps -e | grep bluetoothd > /dev/null && echo "1" || echo "0" ++ ;; ++ + *) + if [ -f ./gui/main.py ]; then + exec python2 ./gui/main.py "$@" +diff -urp QtSixA-1.5.1.orig/sixad/Makefile QtSixA-1.5.1/sixad/Makefile +--- QtSixA-1.5.1.orig/sixad/Makefile 2012-12-06 22:59:03.100535408 -0800 ++++ QtSixA-1.5.1/sixad/Makefile 2012-12-06 22:59:17.417127047 -0800 +@@ -34,7 +34,6 @@ install: + install -m 755 bins/sixad-remote $(DESTDIR)/usr/bin/ + install -m 755 bins/sixad-3in1 $(DESTDIR)/usr/bin/ + install -m 755 bins/sixad-raw $(DESTDIR)/usr/bin/ +- install -m 755 sixad-dbus-blocker $(DESTDIR)/usr/bin/ + @chmod 777 -R $(DESTDIR)/var/lib/sixad/ + @echo "Installation is Complete!" + +@@ -47,5 +46,4 @@ uninstall: + rm -f $(DESTDIR)/usr/bin/sixad-sixaxis + rm -f $(DESTDIR)/usr/bin/sixad-remote + rm -f $(DESTDIR)/usr/bin/sixad-raw +- rm -f $(DESTDIR)/usr/bin/sixad-dbus-blocker + rm -rf $(DESTDIR)/var/lib/sixad/ +diff -urp QtSixA-1.5.1.orig/sixad/sixad QtSixA-1.5.1/sixad/sixad +--- QtSixA-1.5.1.orig/sixad/sixad 2012-12-06 22:59:03.100535408 -0800 ++++ QtSixA-1.5.1/sixad/sixad 2012-12-06 22:59:17.417127047 -0800 +@@ -48,9 +48,6 @@ $SUDO /usr/bin/modprobe uinput + } + + bt_start () { +-$SUDO rm -f /tmp/.sixad-dbus-blocker.pid +-env sleep 1 +- + if [ -f /lib/udev/rules.d/97-bluetooth.rules ]; then + $SUDO /usr/bin/bluetoothd --udev + elif [ -f /etc/rc.d/bluetooth ]; then +@@ -64,8 +61,6 @@ bt_stop() { + if (bluetoothd_running_check); then + $SUDO pkill -KILL bluetoothd + fi +- +-$SUDO /usr/bin/sixad-dbus-blocker & + } + + case $1 in diff --git a/qtsixa [maintainership transfered]/qtsixa-gksudo.patch b/qtsixa [maintainership transfered]/qtsixa-gksudo.patch new file mode 100644 index 0000000..be48f50 --- /dev/null +++ b/qtsixa [maintainership transfered]/qtsixa-gksudo.patch @@ -0,0 +1,71 @@ +diff -urpN QtSixA-1.5.1.orig/qtsixa/qtsixa QtSixA-1.5.1/qtsixa/qtsixa +--- QtSixA-1.5.1.orig/qtsixa/qtsixa 2012-12-06 22:04:55.574316391 -0800 ++++ QtSixA-1.5.1/qtsixa/qtsixa 2012-12-06 22:33:20.185320845 -0800 +@@ -10,44 +10,53 @@ case $1 in + KDESU='kdesu -- ' + KDESUDO='kdesudo -i /usr/share/qtsixa/icons/qtsixa.png -- ' + GKSU='gksu --description /usr/share/applications/qtsixa.desktop -- ' ++GKSUDO='gksudo --description /usr/share/applications/qtsixa.desktop --' + + #taken from winetricks (modified): + if [ x"$KDE_FULL_SESSION" = x"true" ]; then + { #KDE + if [ -f /usr/bin/kdesudo ]; then ROOT="$KDESUDO"; else + if [ -f /usr/bin/kdesu ]; then ROOT="$KDESU"; else +- if [ -f /usr/bin/gksu ]; then ROOT="$GKSU"; else +- ROOT='sudo' ++ if [ -f /usr/bin/gksudo ]; then ROOT="$GKSUDO"; else ++ if [ -f /usr/bin/gksu ]; then ROOT="$GKSU"; else ++ ROOT='sudo' ++ fi + fi + fi + fi + } #KDE (End) + else if [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then + { #Gnome +- if [ -f /usr/bin/gksu ]; then ROOT="$GKSU"; else +- if [ -f /usr/bin/kdesudo ]; then ROOT="$KDESUDO"; else +- if [ -f /usr/bin/kdesu ]; then ROOT="$KDESU"; else +- ROOT='sudo' ++ if [ -f /usr/bin/gksudo ]; then ROOT="$GKSUDO"; else ++ if [ -f /usr/bin/gksu ]; then ROOT="$GKSU"; else ++ if [ -f /usr/bin/kdesudo ]; then ROOT="$KDESUDO"; else ++ if [ -f /usr/bin/kdesu ]; then ROOT="$KDESU"; else ++ ROOT='sudo' ++ fi + fi + fi + fi + } #Gnome (End) + else if [ x"$DISPLAY" != x"" ]; then + { #Other X +- if [ -f /usr/bin/gksu ]; then ROOT="$GKSU"; else +- if [ -f /usr/bin/kdesudo ]; then ROOT="$KDESUDO"; else +- if [ -f /usr/bin/kdesu ]; then ROOT="$KDESU"; else +- ROOT='sudo' ++ if [ -f /usr/bin/gksudo ]; then ROOT="$GKSUDO"; else ++ if [ -f /usr/bin/gksu ]; then ROOT="$GKSU"; else ++ if [ -f /usr/bin/kdesudo ]; then ROOT="$KDESUDO"; else ++ if [ -f /usr/bin/kdesu ]; then ROOT="$KDESU"; else ++ ROOT='sudo' ++ fi + fi + fi + fi + } #Other X (End) + else + { #No known session +- if [ -f /usr/bin/gksu ]; then ROOT="$GKSU"; else +- if [ -f /usr/bin/kdesudo ]; then ROOT="$KDESUDO"; else +- if [ -f /usr/bin/kdesu ]; then ROOT="$KDESU"; else +- ROOT='sudo' ++ if [ -f /usr/bin/gksudo ]; then ROOT="$GKSUDO"; else ++ if [ -f /usr/bin/gksu ]; then ROOT="$GKSU"; else ++ if [ -f /usr/bin/kdesudo ]; then ROOT="$KDESUDO"; else ++ if [ -f /usr/bin/kdesu ]; then ROOT="$KDESU"; else ++ ROOT='sudo' ++ fi + fi + fi + fi diff --git a/qtsixa [maintainership transfered]/qtsixa.install b/qtsixa [maintainership transfered]/qtsixa.install new file mode 100644 index 0000000..fd8ebfb --- /dev/null +++ b/qtsixa [maintainership transfered]/qtsixa.install @@ -0,0 +1,13 @@ +post_install() { + groupadd sixad &> /dev/null + chown -R root:sixad /var/lib/sixad/ + chmod 775 -R /var/lib/sixad/ + echo "You may need to add your user in sixad's group in order to use QTSixa" + } + +post_upgrade() { + groupadd sixad &> /dev/null + chown -R root:sixad /var/lib/sixad/ + chmod 775 -R /var/lib/sixad/ + echo "You may need to add your user in sixad's group in order to use QTSixa" +} diff --git a/qtsixa [maintainership transfered]/sixad-bin.patch b/qtsixa [maintainership transfered]/sixad-bin.patch new file mode 100644 index 0000000..f19d0ea --- /dev/null +++ b/qtsixa [maintainership transfered]/sixad-bin.patch @@ -0,0 +1,17 @@ +--- QtSixA-1.5.1/sixad/sixad.orig 2011-10-12 18:39:33.000000000 +0200 ++++ QtSixA-1.5.1/sixad/sixad 2011-12-28 18:18:05.000000000 +0100 +@@ -117,10 +117,10 @@ + $SUDO rc-update add sixad + # Debian (default) + else +- if [ -f /etc/rc2.d/S90sixad ]; then true; else $SUDO ln -s /etc/init.d/sixad /etc/rc2.d/S90sixad; fi +- if [ -f /etc/rc3.d/S90sixad ]; then true; else $SUDO ln -s /etc/init.d/sixad /etc/rc3.d/S90sixad; fi +- if [ -f /etc/rc4.d/S90sixad ]; then true; else $SUDO ln -s /etc/init.d/sixad /etc/rc4.d/S90sixad; fi +- if [ -f /etc/rc5.d/S90sixad ]; then true; else $SUDO ln -s /etc/init.d/sixad /etc/rc5.d/S90sixad; fi ++ if [ -f /etc/rc2.d/S90sixad ]; then true; else $SUDO ln -s /etc/rc.d/sixad /etc/rc2.d/S90sixad; fi ++ if [ -f /etc/rc3.d/S90sixad ]; then true; else $SUDO ln -s /etc/rc.d/sixad /etc/rc3.d/S90sixad; fi ++ if [ -f /etc/rc4.d/S90sixad ]; then true; else $SUDO ln -s /etc/rc.d/sixad /etc/rc4.d/S90sixad; fi ++ if [ -f /etc/rc5.d/S90sixad ]; then true; else $SUDO ln -s /etc/rc.d/sixad /etc/rc5.d/S90sixad; fi + fi + ;; + diff --git a/qtsixa [maintainership transfered]/sixad-init.patch b/qtsixa [maintainership transfered]/sixad-init.patch new file mode 100644 index 0000000..afc0aeb --- /dev/null +++ b/qtsixa [maintainership transfered]/sixad-init.patch @@ -0,0 +1,54 @@ +--- QtSixA-1.5.1/sixad/sixad.init.ori 2011-07-18 20:04:47.000000000 +0200 ++++ QtSixA-1.5.1/sixad/sixad.init 2011-10-22 16:40:56.000000000 +0200 +@@ -19,40 +19,40 @@ + ps -e | grep sixad-bin > /dev/null + } + +-. /lib/lsb/init-functions ++. /etc/rc.conf ++. /etc/rc.d/functions + + case "$1" in + start) + if (sixad_already_running_check "$1"); then +- log_warning_msg "sixad is already running" ++ stat_busy "Sixad is already running." ++ stat_fail + else + { +- log_daemon_msg "Starting sixad" ++ stat_busy "Starting sixad" + $DAEMON --start &>>/var/log/sixad & +- log_end_msg 0 ++ stat_done + } + fi + ;; + stop) + if (sixad_already_running_check "$1"); then + { +- log_daemon_msg "Stopping sixad" ++ stat_busy "Stopping sixad" + $DAEMON --stop || true +- log_end_msg 0 ++ stat_done + } + else +- log_warning_msg "sixad is not running" ++ stat_busy "Stopping sixad... is not running" ++ stat_fail + fi + ;; + restart) + $0 stop + $0 start + ;; +- status) +- status_of_proc "sixad-bin" "sixad" && exit 0 || exit $? +- ;; + *) +- echo "Usage: /etc/init.d/sixad {start|stop|restart|status}" >&2 ++ echo "Usage: /etc/rc.d/sixad {start|stop|restart}" >&2 + exit 1 + ;; + esac diff --git a/qtsixa [maintainership transfered]/sixad-shared-h.patch b/qtsixa [maintainership transfered]/sixad-shared-h.patch new file mode 100644 index 0000000..9940b97 --- /dev/null +++ b/qtsixa [maintainership transfered]/sixad-shared-h.patch @@ -0,0 +1,11 @@ +--- QtSixA-1.5.1/sixad/shared.h.orig 2011-10-12 02:37:38.000000000 +0200
++++ QtSixA-1.5.1/sixad/shared.h 2012-04-10 13:36:49.119637000 +0200
+@@ -18,6 +18,8 @@
+ #ifndef SHARED_H
+ #define SHARED_H
+
++#include <unistd.h>
++
+ struct dev_led {
+ bool enabled;
+ bool anim;
\ No newline at end of file diff --git a/qtsixa [maintainership transfered]/sixad.service b/qtsixa [maintainership transfered]/sixad.service new file mode 100644 index 0000000..300720d --- /dev/null +++ b/qtsixa [maintainership transfered]/sixad.service @@ -0,0 +1,15 @@ +[Unit] +Description=SixAxis daemon +# It does not conflict, if the input plugin is disabled. +#Conflicts=bluetooth.service +After=bluetooth.target +Requires=bluetooth.service + +[Service] +Type=simple +ExecStart=/usr/bin/sixad-bin 0 0 0 +Restart=on-failure + +[Install] +WantedBy=bluetooth.target +#WantedBy=multi-user.target |